<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Java Guardian Content API - Java Guardian Content API - Examples</title>
    <style type="text/css" media="all">
      @import url("./css/maven-base.css");
      @import url("./css/maven-theme.css");
      @import url("./css/site.css");
    </style>
    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
          <meta name="author" content="Written by Michael Lee" />
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
      </head>
  <body class="composite">
    <div id="banner">
                    <span id="bannerLeft">
    
            Guardian :: API :: Library
    
            </span>
                    <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
  
  
    
              <div class="xright">      
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
  
  
    
                   <h5>Java Guardian Content API</h5>
            <ul>
              
    <li class="none">
                    <a href="index.html">Overview</a>
          </li>
              
    <li class="none">
                    <a href="usage.html">Usage</a>
          </li>
              
    <li class="none">
              <strong>Examples</strong>
        </li>
          </ul>
              <h5>Project Documentation</h5>
            <ul>
              
                
              
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="project-info.html">Project Information</a>
                </li>
              
                
              
      
            
      
              
        <li class="collapsed">
                    <a href="project-reports.html">Project Reports</a>
                </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
  
  
    
            <div id="lastPublished">
        Last Published: 03-09-09
              </div>
            </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>The document talks about the examples that show basic scenarios of using the Java client</h2>
</div>
<div class="section"><h2>Overview</h2>
<p>The examples make use of the guardian-content-api.jar file and its associated library dependencies (file in the lib folder, only required if you are making use of the relevant functionality)</p>
<p>The best way of understanding the examples is by looking at the source code and attempting to run them. </p>
</div>
<div class="section"><h2>Running</h2>
<p>The examples are configured with a classpath that references all libraries relative to the base directory of a local Maven repository. If you edit the batch files you will need </p>
<ul><li>Install the Guardian Content API (i.e. mvn install -Dmaven.test.skip=true) to ensure that the required dependencies are installed in your maven repository</li>
<li>Package the Guardian Content API examples (i.e. mvn package) to ensure that the examples have been compiled and the required library dependencies are in the correct location</li>
<li>Use a command prompt, navigate into the directory containing the examples (examples) and run one of the four examples<ul><li>pojo.bat makes use of standard Java constructors and the Jaxb Java objects</li>
<li>pojoxml.bat makes use of standard Java constructors and the XmlBeans Java objects</li>
<li>spring.bat makes use of Spring constructors and the Jaxb Java objects</li>
<li>springxml.bat makes use of Spring constructors and the XmlBeans Java objects</li>
</ul>
<ul><li>You can run the batch files with no arguments and it will respond by displaying the usage parameters</li>
</ul>
</li>
</ul>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2009
    
          
  

  
    
  
  
    
   - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a></div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
